#include <iostream>
#include <memory>
#include "tcpClient.hpp"

using namespace TcpClient;

void Uasge()
{
    std::cout << "Uasge : tip  ./tcpServer Serverip Serverport " << std::endl;     
}
//  ./tcpClient serverip serverport
int main(int argc , char * arvg[])
{
    if(argc != 3)
    {
        Uasge();
        exit(5);
    }
    uint16_t port = atoi(arvg[2]);
    std::string ip = arvg[1];

    std::unique_ptr<Client> tcpcli(new Client(ip,port));

    tcpcli->init();
    tcpcli->start();
    
    return 0;
}